<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 分组表 基类
 * @Entity
 * @Table(name="sc_auth_group", id={"id"})
 * @DDL("CREATE TABLE `sc_auth_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父组别',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '组名',
  `rules` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '规则ID',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  `status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='分组表'")
 * @property int $id 
 * @property int $pid 父组别
 * @property string $name 组名
 * @property string $rules 规则ID
 * @property int $createtime 创建时间
 * @property int $updatetime 更新时间
 * @property string $status 状态
 */
abstract class ScAuthGroupBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 父组别
     * pid
     * @Column(name="pid", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $pid;

    /**
     * 获取 pid - 父组别
     *
     * @return int
     */ 
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * 赋值 pid - 父组别
     * @param int $pid pid
     * @return static
     */ 
    public function setPid($pid)
    {
        $this->pid = $pid;
        return $this;
    }

    /**
     * 组名
     * name
     * @Column(name="name", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 组名
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 组名
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 规则ID
     * rules
     * @Column(name="rules", type="text", length=0, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $rules;

    /**
     * 获取 rules - 规则ID
     *
     * @return string
     */ 
    public function getRules()
    {
        return $this->rules;
    }

    /**
     * 赋值 rules - 规则ID
     * @param string $rules rules
     * @return static
     */ 
    public function setRules($rules)
    {
        $this->rules = $rules;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 状态
     * status
     * @Column(name="status", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

}
